package com.ftcs.service.impl;


import com.ftcs.mapper.LoginMapper;
import com.ftcs.entity.User;
import com.ftcs.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    LoginMapper loginmapper;

    @Override
    public String getPwdbyName(String name) {
        User user = loginmapper.getPwdByName(name);
        return Objects.nonNull(user) ? user.getPassword() : null;
    }

}
